package com.wolfman.uploadfile.service.impl;

import com.wolfman.uploadfile.mapper.FileUploadMapper;
import com.wolfman.uploadfile.po.FileUpload;
import com.wolfman.uploadfile.service.FileUploadService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Title
 * @Description
 * @Author WolfMan
 * @Date 2021/8/23 13:54
 * @Email 2370032534@qq.com
 */
@Service
@Transactional(rollbackFor = {Exception.class})
public class FileUploadServiceImpl implements FileUploadService {
    @Resource
    FileUploadMapper fileUploadMapper;


    @Override
    public void insertOne(FileUpload fileUpload) {
        fileUploadMapper.insertOne(fileUpload);
    }

    @Override
    public void updateProcess(FileUpload fileUpload) {
        fileUploadMapper.updateProcess(fileUpload);
    }

    @Override
    public FileUpload selectById(FileUpload fileUpload) {
        return fileUploadMapper.selectById(fileUpload);
    }

    @Override
    public Double selectProcessById(FileUpload fileUpload) {
        return fileUploadMapper.selectProcessById(fileUpload);
    }

    @Override
    public List<FileUpload> selectAllUnfinished() {
        return fileUploadMapper.selectAllUnfinished();
    }

    @Override
    public void deleteById(FileUpload f) {
        fileUploadMapper.deleteById(f);
    }
}
